//
//  DetaisViewCell.m
//  Alltelevisionnews
//
//  Created by dllo on 15/11/28.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "DetaisViewCell.h"

@implementation DetaisViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView {
    self.talkLabel = [[UILabel alloc] init];
    self.talkLabel.textAlignment = NSTextAlignmentRight;
    [self.contentView addSubview:self.talkLabel];
    
    self.titleLabel = [[UILabel alloc] init];
    self.titleLabel.font = [UIFont systemFontOfSize:20];
    [self.contentView addSubview:self.titleLabel];
    
    self.timeLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.timeLabel];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(self.contentView).with.offset(10);
        make.left.equalTo(self.contentView).with.offset(20);
        make.right.equalTo(self.contentView).with.offset(-20);
        make.bottom.equalTo(self.talkLabel.mas_top).with.offset(-10);
    }];
    [self.talkLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.right.equalTo(self.contentView).with.offset(-10);
        make.bottom.equalTo(self.contentView).with.offset(-6);
        make.width.mas_equalTo(100);
        make.height.mas_equalTo(20);
    }];

    [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.left.equalTo(self.contentView).with.offset(20);
        make.bottom.equalTo(self.contentView).with.offset(-6);
        make.width.mas_equalTo(100);
        make.height.mas_equalTo(20);
        
    }];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
